Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.runtime.api.ServiceManagement

Documentation

The service management component is describing the application layout and service bindings

The application is split in groups of services. Each group can be located on a different host (i.e. different JVM). A host exposing services is named "server". So a server may expose one or more service groups. This component let you define the application layout and define each server and service groups that form the application.

Thus the main responsibility of a server is to expose (locate and instantiate) services. Each server definition should specify a locator to be used to lookup services.

If the service is not found on any server Nuxeo Runtime will be used to locate it.

To bind services to a server you should specify the group containing the service. And then bind the group to a server.

If you don't specify any group (or the group you specify is not bound to any server) the service will be automatically added to the root group (the default one)

Implementation

Class: org.nuxeo.runtime.api.ServiceManagement

Services

Extension Points

XML Source

<?xml version="1.0"?>

<component name="org.nuxeo.runtime.api.ServiceManagement" version="1.0.0">
  <documentation>
  The service management component is describing the application layout and service bindings
  <p/>
  The application is split in groups of services. Each group can be located on a different host (i.e. different JVM).
  A host exposing services is named "server". So a server may expose one or more service groups.
  This component let you define the application layout and define each server and service groups that
  form the application.
  <p/>
  Thus the main responsibility of a server is to expose (locate and instantiate) services.
  Each server definition should specify a locator to be used to lookup services.
  <p/>
  If the service is not found on any server Nuxeo Runtime will be used to locate it.
  <p/>
  To bind services to a server you should specify the group containing the service.
  And then bind the group to a server.
  <p/>
  If you don't specify any group (or the group you specify is not bound to any server) the service
  will be automatically added to the root group (the default one)

  @author Bogdan Stefanescu (bs@nuxeo.com)
  </documentation>

  <implementation class="org.nuxeo.runtime.api.ServiceManagement"/>

  <service>
    <provide interface="org.nuxeo.runtime.api.ServiceManager" />
  </service>

  <extension-point name="servers">
    <documentation>Define a server that expose services.
    <p/>
    A server is
    </documentation>
    <object class="org.nuxeo.runtime.api.ServiceHost"/>
  </extension-point>

  <extension-point name="services">
    <documentation>Define a service binding.
    <p/>
    Services are part of a group. If no group is specified the root group will be used
    <p/>
    Groups are bound to servers. If a group is not bound services in the group will be considered
    to be part of the root group
    <p/>
    Services are defined by a class and an optional name. The service locator used
    for the server exposing the service will locate the service using these information.
    You can optionally specify a custom locator by using the "locator" sub-element.
    <p/>
    Services bindings may also define an adapter that will be used to adapt the service immediately
    after its instantiation. This can be used to decorate services (for example you can decorate a service to
    enable caching on the client side) or to handle session oriented services.
    This way you can start the session using the adapter.
     </documentation>
    <object class="org.nuxeo.runtime.api.ServiceDescriptor"/>
  </extension-point>

</component>